package com.pay.entity;

import java.io.Serializable;
import java.util.Date;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

/**
 * <p>
 * 
 * </p>
 *
 * @author Peng
 * @since 2018-12-07
 */
@TableName("t_order")
public class Order implements Serializable {

	private static final long serialVersionUID = 1L;

	@TableField(exist=false)
	private Merchant merchant ; 
	
	/**
	 * 订单表
	 */
	@TableId(value = "id", type = IdType.AUTO)
	private Integer id;

	/**
	 * 商户编号
	 */
	private Integer merchantId;

	/**
	 * 业务类型
	 */
	private String servicetype;

	/**
	 * 商户订单号
	 */
	private String orderno;

	/**
	 * 平台订单号
	 */
	private String platno;

	/**
	 * 金额 精确到分
	 */
	private Long amount;

	/**
	 * 交易币种默认CNY
	 */
	private String currency;

	/**
	 * 异步回调地址
	 */
	private String notify;

	/**
	 * 通道编码 支付宝H5：alipaywap,支付宝扫码：alipayqr,微信扫码：wxqr
	 */
	private String type;

	/**
	 * 需要回应吗1需要 0不需要
	 */
	private Integer needresponse;

	/**
	 * 商品名称
	 */
	private String goods;

	/**
	 * 前端返回地址
	 */
	@TableField("returnUrl")
	private String returnUrl;

	/**
	 * 签名
	 */
	private String sign;

	/**
	 * 支付标记码
	 */
	private String flagcode;

	/**
	 * 订单创建时间
	 */
	private Date createtime;

	/**
	 * 订单完成时间
	 */
	private Date successtime;

	/**
	 * 是否支付0未 1支付了 2支付关闭了
	 */
	private Integer paystatus;

	/**
	 * 是否回调成功0未  1成功
	 */
	private Integer notifystatus;

	/**
	 * 回调的次数
	 */
	private Integer notifycount;

	private long merchantAmount ; 
	
	private long taxAmount ; 
	
	
	public long getMerchantAmount() {
		return merchantAmount;
	}

	public void setMerchantAmount(long merchantAmount) {
		this.merchantAmount = merchantAmount;
	}

	public long getTaxAmount() {
		return taxAmount;
	}

	public void setTaxAmount(long taxAmount) {
		this.taxAmount = taxAmount;
	}

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public Integer getMerchantId() {
		return merchantId;
	}

	public void setMerchantId(Integer merchantId) {
		this.merchantId = merchantId;
	}

	public String getServicetype() {
		return servicetype;
	}

	public void setServicetype(String servicetype) {
		this.servicetype = servicetype;
	}

	public String getOrderno() {
		return orderno;
	}

	public void setOrderno(String orderno) {
		this.orderno = orderno;
	}

	public String getPlatno() {
		return platno;
	}

	public void setPlatno(String platno) {
		this.platno = platno;
	}

	public Long getAmount() {
		return amount;
	}

	public void setAmount(Long amount) {
		this.amount = amount;
	}

	public String getCurrency() {
		return currency;
	}

	public void setCurrency(String currency) {
		this.currency = currency;
	}

	public String getNotify() {
		return notify;
	}

	public void setNotify(String notify) {
		this.notify = notify;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public Integer getNeedresponse() {
		return needresponse;
	}

	public void setNeedresponse(Integer needresponse) {
		this.needresponse = needresponse;
	}

	public String getGoods() {
		return goods;
	}

	public void setGoods(String goods) {
		this.goods = goods;
	}

	public String getReturnUrl() {
		return returnUrl;
	}

	public void setReturnUrl(String returnUrl) {
		this.returnUrl = returnUrl;
	}

	public String getSign() {
		return sign;
	}

	public void setSign(String sign) {
		this.sign = sign;
	}

	public String getFlagcode() {
		return flagcode;
	}

	public void setFlagcode(String flagcode) {
		this.flagcode = flagcode;
	}

	public Date getCreatetime() {
		return createtime;
	}

	public void setCreatetime(Date createtime) {
		this.createtime = createtime;
	}

	public Date getSuccesstime() {
		return successtime;
	}

	public void setSuccesstime(Date successtime) {
		this.successtime = successtime;
	}

	public Integer getPaystatus() {
		return paystatus;
	}

	public void setPaystatus(Integer paystatus) {
		this.paystatus = paystatus;
	}

	public Integer getNotifystatus() {
		return notifystatus;
	}

	public void setNotifystatus(Integer notifystatus) {
		this.notifystatus = notifystatus;
	}

	public Integer getNotifycount() {
		return notifycount;
	}

	public void setNotifycount(Integer notifycount) {
		this.notifycount = notifycount;
	}

	public Merchant getMerchant() {
		return merchant;
	}

	public void setMerchant(Merchant merchant) {
		this.merchant = merchant;
	}

	@Override
	public String toString() {
		return "Order{" +
				"id=" + id +
				", merchantId=" + merchantId +
				", servicetype=" + servicetype +
				", orderno=" + orderno +
				", platno=" + platno +
				", amount=" + amount +
				", currency=" + currency +
				", notify=" + notify +
				", type=" + type +
				", needresponse=" + needresponse +
				", goods=" + goods +
				", returnUrl=" + returnUrl +
				", sign=" + sign +
				", flagcode=" + flagcode +
				", createtime=" + createtime +
				", successtime=" + successtime +
				", paystatus=" + paystatus +
				", notifystatus=" + notifystatus +
				", notifycount=" + notifycount +
				"}";
	}
}
